package email

import "fmt"
import "design-pattern/template-method/otp"


type impl struct {
	id string
}
func(i *impl)	GenRandom() string{
	return i.id
}
func(i *impl)	SaveOtpCache(){
	fmt.Println("saveotpcache")
}
func(i *impl)	GetMessage(){
	fmt.Println("Getmessage")
}
func(i *impl)	SendNotification(){
	fmt.Println("Sendnotification")
}
func(i *impl)	PublishMetric(){
	fmt.Println("Publishmetric")
}

func NewEmail()otp.IOtp{
	return &impl{id: "email"}
}

func StubRun(){

	e := NewEmail()
	o := otp.NewOtp(e)

	o.GenAndSendOtp()
}
